package com.woniuxy.hackredis;
import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
/**
 * @ClassName MyHackRedis
 * @Description TODO
 * @Author LI.hh
 * @Date 2022/9/13 23:12
 * @Version 1.0
 */
public class MyHackRedis {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(6379);
        Socket socket = serverSocket.accept();
        InputStream inputStream = socket.getInputStream();
        byte[] read = new byte[2048];
        inputStream.read(read);
        System.err.println(new String(read, StandardCharsets.UTF_8));

//        socket.close();
//        serverSocket.close();
    }
}
